// defining the individual cell

public class CellIndividual { 
   
    public int Cell_type;
    public double payoff=0;
    //public int ageofcell;
   
    /* constructor */
    public CellIndividual(double initFreq){
	if (Math.random() < initFreq) {
	    setCelltype(1);
	} else { 
	    setCelltype(0);
	}
	setPayoff (0);
    }

    public void setCelltype (int value){
       Cell_type = value;
    }

    public int getCelltype(){
        return Cell_type;
    }
    
    public void setPayoff (double value){
        payoff = value;
    }
    
    public void addtoPayoff(double value){
	payoff += value; 
    }
    
    public double getPayoff(){
        return payoff;
    }
 
}
